﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIT.Controls.Input;
using UIT.Controls;
using System.Xml;

namespace UIT.Web.Renderers
{
    public class TextBoxRenderer : WebControlRenderer<TextBox>
    {
        public override void Render(TextBox control)
        {
            writer.WriteStartElement("input");
            writer.WriteAttributeString("type", "text");
            if (control.Id != null)
            {
                writer.WriteAttributeString("id", control.Id);
                writer.WriteAttributeString("name", control.Id);
            }
            writer.WriteAttributeString("value", control.Text);
            writer.WriteEndElement();
        }
    }
}
